package com.hsbc.dev.teamo4.sms.sm.controller;

import com.hsbc.dev.teamo4.sms.common.fields.ResponseResults;
import com.hsbc.dev.teamo4.sms.sm.po.Menu;
import com.hsbc.dev.teamo4.sms.sm.service.IMenuService;
import com.hsbc.dev.teamo4.sms.sm.service.impl.MenuServiceImpl;

/**
 * @author:Cady
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.controller
 * @Description:
 * @Date date: 2018-07-26
 */
public class MenuController {
    private IMenuService menuService = new MenuServiceImpl();


    public ResponseResults addMenu(Menu menu){
        return ResponseResults.responseBySuccess("ok",menuService.save(menu));
    }

    public ResponseResults getMenuTree(){
        return ResponseResults.responseBySuccess("ok",menuService.getMenuTree());
    }

    /*public ResponseResults disableMenu(String id){
        //return ResponseResults.responseBySuccess("ok",menuService.deleteMenuById(id));
    }*/

    public ResponseResults updateMenu(Menu menu){
        return ResponseResults.responseBySuccess("ok",menuService.update(menu));
    }
}
